class FruitStaticProxy extends Fruit {
    private Fruit realFruit;

    public FruitStaticProxy(Fruit fruit) {
        this.realFruit = fruit;
    }

    @Override
    public void eat() {
        preProcess();
        realFruit.eat();
        postProcess();
    }

    private void preProcess() {
        System.out.println("[静态代理] 预处理：检查水果新鲜度");
    }

    private void postProcess() {
        System.out.println("[静态代理] 后处理：记录食用日志\n");
    }
}